<title>巡检计划</title>

<div class="layui-card layadmin-header">
    <div class="layui-breadcrumb" lay-filter="breadcrumb">
        <a>设备巡检</a>
        <a><cite>设备计划</cite></a>
    </div>
</div>
<div class="main">
    <button type="button" class="layui-btn layui-btn-normal addbtn">
        <i class="layui-icon">&#xe608;</i> 新增计划</button>
    <div class="headsearch" style="display: inline-block;">
        <form class="layui-form" action="" lay-filter="formTest">
            <div class="layui-form-item">
                <label class="layui-form-label">计划名称</label>
                <div class="layui-input-block">
                    <input type="text" name="title" required lay-verify="required" placeholder="请输入标题"
                        autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">计划编号</label>
                <div class="layui-input-block">
                    <input type="text" name="title" required lay-verify="required" placeholder="请输入标题"
                        autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">计划状态</label>
                <div class="layui-input-block">
                    <select name="city" lay-verify="required">
                        <option value=""></option>
                        <option value="0">北京</option>
                        <option value="1">上海</option>
                        <option value="2">广州</option>
                        <option value="3">深圳</option>
                        <option value="4">杭州</option>
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">计划时间</label>
                <div class="layui-input-block">
                    <input type="text" class="layui-input" id="test1">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">位置范围</label>
                <div class="layui-input-block">
                    <input type="text" name="title" required lay-verify="required" placeholder="请输入标题"
                        autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">测试</label>
                <div class="layui-input-block">
                    <input type="text" class="layui-input" id="test1" laybind="oname">
                </div>
                <ul>
                    <li></li>
                </ul>
            </div>
            <div class="searchobtns">
                <button type="button" class="layui-btn layui-btn-normal search">
                    <i class="layui-icon layui-icon-search" style="height: 16px;"></i>
                    查询</button>
            </div>
        </form>

    </div>
    <!-- top:188px; -->
    <div style="position: relative;width: 98%;">
        <table id="demo" lay-skin='nob' lay-even></table>
        <div id="pagefy"></div>
        <button type="button" class="layui-btn layui-btn-normal zwhilte addbtn">
            <i class="layui-icon">&#xe608;</i> 删除</button>
        <button type="button" class="layui-btn layui-btn-normal zwhilte addbtn blue">
            <i class="layui-icon">&#xe608;</i> 启用/停用</button>
        <button type="button" class="layui-btn layui-btn-normal zwhilte addbtn blue">
            <i class="layui-icon">&#xe608;</i> 时间/频率调整</button>

        <button type="button" class="layui-btn layui-btn-normal zwhilte addbtn blue">
            <i class="layui-icon">&#xe608;</i> 定制表头</button>
    </div>

</div>



<script>

    layui.link("../../../src/style/gd.css")
    layui.use(['table', 'laydate', 'layer', 'form'], function () {
        var table = layui.table;
        var laydate = layui.laydate;
        var form = layui.form
        // var jquey=layui.jquey 
        //执行一个laydate实例
        laydate.render({
            elem: '#pagefy', //指定元素
            limit: '10',
            count: 4 //数据总数，从服务端得到
        });
        var layer = layui.layer;
        form.val("formTest", {
            "oname": ' position_sort'
        });
        form.render(); //更新全部    
        //第一个实例
        table.render({
            elem: '#demo',
            height: 312,
            'lay-skin': "nob",
            style: 'background-color: #5FB878; color: #fff',
            even: true,
            skin: "nob",
            // ,url: '/demo/table/user/' //数据接口
            page: true,//开启分页
            cols: [[ //表头
                { field: 'tc_plan_id', title: '序号', width: 60, align: 'center', fixed: 'left' }
                , { field: 'tc_plan_name', title: '操作', width: 100, align: 'center', toolbar: '#barDemo' }
                , { field: 'tc_plan_name', title: '计划名称', align: 'center', width: 100 }
                , { field: 'tc_plan_code', title: '计划编号', align: 'center', width: 100 }
                , { field: 'tc_plan_status', title: '计划状态', align: 'center', width: 100 }
                , { field: 'sign', title: '上次巡检时间', align: 'center', width: 125 }
                , { field: 'experience', title: '下次巡检时间', align: 'center', width: 125 }
                , { field: 'tc_plan_start', title: '计划开始时间', align: 'center', width: 125 }
                , { field: 'tc_plan_end', title: '计划结束时间', align: 'center', width: 125 }
                , { field: 'tc_plan_frequency', title: '计划频率', align: 'center', width: 100 }
                , { field: 'tc_plan_area', title: '位置范围', align: 'center', width: 100 }
                , { field: 'wealth', title: '总设备数', align: 'center', width: 100 }
            ]],
            data: [{
                tc_plan_id: '0',
                tc_plan_name: '日检',
                tc_plan_code: '201203123',
                tc_plan_status: '使用中',
                tc_plan_start: '2019-3-2',
                tc_plan_end: '2019-3-2',
                sign: '2019-3-2',
                experience: '2019-4-2',
                tc_plan_frequency: '使用中',
                tc_plan_area: '使用中',
                wealth: '4',
            }, {
                tc_plan_id: '0',
                tc_plan_name: '日检',
                tc_plan_code: '201203123',
                tc_plan_status: '使用中',
                tc_plan_start: '2019-3-2',
                tc_plan_end: '2019-3-2',
                sign: '2019-3-2',
                experience: '2019-4-2',
                tc_plan_frequency: '使用中',
                tc_plan_area: '使用中',
                wealth: '4',
            }
            ]

        });
    });

</script>

<script type="text/html" id="barDemo">
    <img src="../../src/style/res/baobiao.png" alt="">
    <img src="../../src/style/res/printing.png" alt="">
    <img src="../../src/style/res/printing.png" alt="">
    <a lay-event="detail"><img src="../../src/style/res/baobiao.png" alt=""></a>
    <a class="layui-btn layui-btn-xs" lay-event="edit"> <img src="../../src/style/res/printing.png" alt=""></a>
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del"> <img src="../../src/style/res/printing.png" alt=""></a>

    <!-- 这里同样支持 laytpl 语法，如： -->
    {{# if(d.auth > 2){ }}
    <a class="layui-btn layui-btn-xs" lay-event="check">审核</a> {{# } }}
</script>